% XlWindowState - enumeration for Excel WindowState property
% Notes:
%

% Auth/Revision: jboyd
%                $Id: XlWindowState.m 1482 2016-12-01 03:23:17Z jboyd $:
%                Copyright 2016, The MathWorks Inc.

classdef XlWindowState < int16
    enumeration
        xlMaximized   (-4137)
        xlMinimized   (-4140)
        xlNormal      (-4143)
    end
    methods (Static)
        function obj = stringToEnum(name)
            obj = Excel.XlWindowState.empty;
            if ischar(name)
                name = {name};
            end
            for k=numel(name):-1:1
                if strcmpi(name{k},'xlMinimized')
                    obj(k) = Excel.XlWindowState.xlMinimized;
                elseif strcmpi(name{k},'xlMaximized')
                    obj(k) = Excel.XlWindowState.xlMaximized;
                elseif strcmpi(name{k},'xlNormal')
                    obj(k) = Excel.XlWindowState.xlNormal;
                else
                    error ('Excel.XlWindowState.stringToEnum: Unknown State: %s', name{k});
                end
            end
            obj = obj(:);
        end
    end
end


